import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,filename='q.txt',format='%(message)s')
def send_mail(filename):
    mail=yagmail.SMTP(user='2071730624@qq.com',password='ulysgdzvaqjwbfcd',host='smtp.qq.com')
    mail.send(to='2071730624@qq.com',subject='标题',contents='内容',attachments=filename)